Aspect-Oriented Programming with C# and .NET
نویسندگان
چکیده
Almost a year ago, Microsoft has introduced the .NET architecture as a new component-based programming environment, which allows for easy integration of classical distributed programming techniques with Web computing. .NET defines a type system and introduces notions such as component, object, and interface, which are building blocks for distributed multi-language component-based applications. As many other component frameworks, .NET mainly focuses on functional interfaces of components. Nonfunctional aspects of components, such as resource usage (CPU, memory), timing behavior, fault-tolerance, or security requirements are currently not expressed in .NET’s component interfaces. These properties are essential for building reliable distributed applications with predictable behavior even in cases of faults. Within this paper, we discuss the usage of aspectoriented programming techniques in context of the .NET framework. We focus on the fault-tolerance aspect and discuss the expression of non-functional component properties (aspects) as C# custom attributes. Our approach uses reflection to generate replicated objects based on settings of a special “fault-tolerance” attribute for C# components. We have implemented an aspect-weaver for integration of aspect-code and componencode, which uses the mechanisms of the language-neutral .NET type system. Therefore, our approach is not restricted to the C# language but works for any of the .NET programming languages.Introduction and Motivation
منابع مشابه
CCC: An Aspect-Oriented Intermediate Language on .Net Platform
The AOSD tools and methodologies have developed in a rapid speed in Java area. However, no matter how homologous .Net and Java are, AOP tools on .Net platform are still in experimental stage. The complex infrastructure and multi-language support make it hard to establish aspect-oriented programming on .Net. Microsoft provides Microsoft Intermediate Language(MSIL) to facilitate language implemen...
متن کاملAspect Weaving with C# and .NET
Since current object oriented programming languages don’t have existing support for aspects, aspects are often supported through language extensions [1, 2]. Another approach is to use the existing language to encapsulate aspect behaviors, and provide an additional language to express cross cutting statements [3-5]. Finally, other systems [6]including the one described in this paper use features...
متن کاملDesign by Contract in .NET Using Aspect Oriented Programming
Most software is being implemented using imperative programming techniques. However, for certain problem domains declarative code has proven to be more expressive, easier to understand and more compact than its imperative counterpart. Aspect Oriented Programming (AOP) seems to be a promising approach for intermixing imperative program code with declarative aspect information using an aspect wea...
متن کاملExecuting Aspect-Oriented Component-Based Software Architectures on .NET Technology
Component-Based Software Development (CBSD) and Aspect-Oriented Software Development (AOSD) have emerged in the last few years as new paradigms of software development. Both approaches provide techniques to improve the structure and reusability of the code. In addition, Aspect-Oriented Programming (AOP) permits the reduction of the maintainability and development costs of the final code by mean...
متن کاملNu: Towards an Aspect-Oriented Invocation Mechanism
The contribution of this work is the design, implementation and evaluation of a new aspect-oriented invocation mechanism for preserving design modularity in object code. We call our mechanism Bind. We make three basic claims. First, it is feasible to realize a programming model that supports Bind to preserve design modularity in object code. Second, the new invocation mechanism further improves...
متن کامل